package apralms

class Project {
	String code
	String name
	String type
	String race
	String period
	Date birthDate

	String classParas = ''
	String preDefineParas = ''
	
	float k2 = 0
	float ke = 0
	
	Date dateCreated
	Date lastUpdated

	static constraints = {
		code blank:false, maxSize:10, unique:true
		name blank:false, maxSize:50, unique:true
		type nullable: true
		race nullable: true
		period nullable: true
		
		preDefineParas nullable: true
	}
	
	static mapping = {
		sort "birthDate"
	}

	static hasMany = [schemes:Scheme, systems:System, products:Product, indexes:ProjectIndex]

	String toString(){
		"${name}[${code}]"
	}
}
